package com.xinya.taobaosale.model;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.io.IOException;

/**
 * @ClassName: ApiException$
 * @Description: java类作用描述
 * @Author: xinya
 * @CreateDate: 2021/2/1$ 19:57$
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
public class ApiException extends IOException {
    private static final long serialVersionUID = 1256016620875694495L;
    private int code;
    private String message;

    public ApiException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Nullable
    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @NonNull
    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}

